/**
 * @description 班次管理
 * @author qiankui 2024-2-19 13:50:29
 **/

import request from '@/assets/common/js/utils/request';

/**
 * @description 自由班制数据统计
 * @param not
 * @return not
 * @author qiankui 2024-3-12 09:38:22
 **/
export function attendancegroupZ_attendancestatistic(data) {
    return request({
        url: 'attendancegroup/z_attendancestatistic',
        method: 'post',
        data: data,
    });
}
/**
 * @description 排班制固定班制数据统计
 * @param not
 * @return not
 * @author qiankui 2024-3-9 14:35:45
 **/
export function attendancegroupGp_attendancestatistic(data) {
    return request({
        url: 'attendancegroup/gp_attendancestatistic',
        method: 'post',
        data: data,
    });
}
/**
 * @description 获取特殊日期列表
 * @param not
 * @return not
 * @author qiankui 2024-2-27 15:56:11
 **/
export function specialdaysGetlist(data) {
    return request({
        url: 'specialdays/getlist',
        method: 'post',
        data: data,
    });
}

/**
 * @description 添加特殊日期
 * @param not
 * @return not
 * @author qiankui 2024-2-27 17:16:54
 **/
export function specialdaysCreate(data) {
    return request({
        url: 'specialdays/create',
        method: 'post',
        data: data,
    });
}
/**
 * @description 添加考勤组
 * @param not
 * @return not
 * @author qiankui 2024-2-27 09:40:27
 **/
export function attendancegroupCreate(data) {
    return request({
        url: 'attendancegroup/create',
        method: 'post',
        data: data,
    });
}
/**
 * @description 设置节假日启用状态
 * @param not
 * @return not
 * @author qiankui 2024-2-21 13:43:47
 **/
export function holidaysEnable(data) {
    var  form = new FormData();
    // form.append("api-version",1)
    form.append("id",data.id)
    form.append("enable",data.enable)
    return request({
        url: 'holidays/enable',
        method: 'post',
        data: form,
    });
}

/**
 * @description 排班制固定班制数据统计 导出到Excel
 * @param not
 * @return not
 * @author qiankui 2024-3-11 17:31:35
 **/
export function attendancegroupExportz_attendancestatistictoexcel(data) {
    return request({
        url: 'attendancegroup/exportz_attendancestatistictoexcel',
        method: 'post',
        responseType: "arraybuffer",
        data: data
    });
}
/**
 * @description 排班制固定班制数据统计 导出到Excel
 * @param not
 * @return not
 * @author qiankui 2024-3-11 17:31:35
 **/
export function attendancegroupExportgp_attendancestatistic(data) {
    return request({
        url: 'attendancegroup/exportgp_attendancestatistic',
        method: 'post',
        responseType: "arraybuffer",
        data: data
    });
}
/**
 * @description 固定班制，排班制 统计某时间段内人员每天考勤情况
 * @param not
 * @return not
 * @author qiankui 2024-3-12 16:42:43
 **/
export function attendancegroupGpgetdetails(data) {
    return request({
        url: `attendancegroup/gpgetdetails`,
        method: 'get',
        params: data,
    });
}
/**
 * @description 自由班制统计某时间段内人员每天考勤情况详情
 * @param not
 * @return not
 * @author qiankui 2024-3-12 16:42:43
 **/
export function attendancegroupZgetdetails(data) {
    return request({
        url: `attendancegroup/zgetdetails`,
        method: 'get',
        params: data,
    });
}
/**
 * @description 获取考勤组详情（排班制页面用）
 * @param not
 * @return not
 * @author qiankui 2024-3-6 15:39:06
 **/
export function searchattendancegroupworkingscheduleinfo(data) {
    return request({
        url: `attendancegroup/searchattendancegroupworkingscheduleinfo`,
        method: 'get',
        params: data,
    });
}
/**
 * @description 通过excel导入节假日
 * @param not
 * @return not
 * @author qiankui 2024-2-21 14:21:40
 **/
export function holidaysImportHolidaysInfo(filePath) {
    var  form = new FormData();
    form.append("filePath",filePath)
    return request({
        url: 'holidays/ImportHolidaysInfo',
        method: 'post',
        data: form,
    });
}

/**
 * @description 删除特殊日期
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:42:07
 **/
export function specialdaysDelete(id) {
    return request({
        url: `specialdays/delete?id=${id}`,
        method: 'DELETE',
    });
}
/**
 * @description 清除临时数据 每次点击新增时候都要调用
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:42:07
 **/
export function specialdaysRemoveteampdata() {
    return request({
        url: `specialdays/removeteampdata`,
        method: 'DELETE',
    });
}
/**
 * @description 删除班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:42:07
 **/
export function attendancegroupDelete(id) {
    return request({
        url: `attendancegroup/delete?id=${id}`,
        method: 'DELETE',
    });
}
/**
 * @description 更新班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 14:22:53
 **/
export function attendancegroupUpdate(data) {
    return request({
        url: `attendancegroup/update/${data.id}`,
        method: 'put',
        data: data,
    });
}
/**
 * @description 更新特殊日期
 * @param not
 * @return not
 * @author qiankui 2024-2-20 14:22:53
 **/
export function specialdaysUpdate(data) {
    return request({
        url: `specialdays/update/${data.id}`,
        method: 'put',
        data: data,
    });
}
